package com.yanqu.road.server.manager.config;

import com.yanqu.road.entity.servercenter.ChannelSystemConfig;
import com.yanqu.road.logic.bussiness.config.ConfigBussiness;
import com.yanqu.road.server.manger.ChannelSystemConfigMgr;
import com.yanqu.road.utils.ConfigHelper;

import java.util.Map;

public class BattleChannelSystemConfigMgr extends ChannelSystemConfigMgr {

    @Override
    public boolean init() throws Exception {
        return reload();
    }

    @Override
    public boolean reloadData() throws Exception {
        getLogger().info("BattleChannelSystemConfigMgr reloadData  start");
        int channelId = ConfigHelper.getInt("channelId");
        Map<Integer, Map<String, ChannelSystemConfig>> systemConfigMap = ConfigBussiness.getChannelSystemConfigMap(channelId);
        setConfigMap(channelId, systemConfigMap);
        getLogger().info("BattleChannelSystemConfigMgr reloadData  end");
        return true;
    }

}
